package com.ruoyi.carShop.service;


import com.ruoyi.carShop.domain.Statistics;
import com.ruoyi.carShop.domain.Withdrawal;
import com.ruoyi.system.api.domain.OrderDetails;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * 订单统计Service接口
 * 
 * @author ruoyi
 * @date 2024-09-07
 */
public interface BusinessStatisticsService
{
    /**
     * 统计数据：今日收入，今日订单总数
     * @param statistics 开始时间、结束时间、商家id
     * @return
     */
    Statistics getCount(Statistics statistics);
    /**
     * 统计数据：饼图、柱状图数据
     * @param statistics
     * @return
     */
    List<Statistics> getCountByType(Statistics statistics);

    /**
     * 查询商铺余额
     * @return 余额
     */
    BigDecimal getShopBalance(Long shopId);

    /**
     * 商铺累计收入金额
     * @param shopId 商铺id
     * @return 收入金额
     */
    BigDecimal getShopOrderIncome(Long shopId);

    /**
     * 商铺累计提现金额
     * @param shopId 商铺id
     * @return 提现金额
     */
    BigDecimal getShopWithdrawal(Long shopId);

    /**
     * 获取商铺的所有订单
     * @param shopId
     * @return
     */
    List<OrderDetails> getTheShopOrder(Long shopId);

    /**
     * 获取商铺的提现信息列表
     * @param shopId
     * @return
     */
    List<Withdrawal> getWithdrawalList(Long shopId);

    /**
     * 添加提现申请
     * @param withdrawal
     * @return
     */
    Long addWithdrawal(Withdrawal withdrawal);

//    /**
//     * 更新商铺的余额
//     * @param ShopId 商铺id
//     * @param balance 余额
//     * @return
//     */
//    Long updateShopBalance(Long ShopId, Long balance);

}
